package com.kittlen.springBootDemo.service.impl;

import com.kittlen.springBootDemo.entity.Department;
import com.kittlen.springBootDemo.entity.User;
import com.kittlen.springBootDemo.mapper.DepartmentMapper;
import com.kittlen.springBootDemo.mapper.UserMappers;
import com.kittlen.springBootDemo.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author kittlen
 * @version 1.0
 * @date 2020/12/7 16:52
 */
@Service
public class UserServiceImpl implements UserService {

    //注入mapper
    @Resource
    UserMappers userMapper;

    @Resource
    DepartmentMapper departmentMapper;


    @Override
    public List<User> selectUser() {
        return userMapper.selectUser();
    }

    @Override
    public User selectById(String id) {
        return userMapper.selectById(id);
    }

    @Override
    public List<Department> selectDepartment() {
        return departmentMapper.selectDepartment();
    }

}
